﻿using BCCommon;
using BCDto.Location.Branches;
using BCDto.Sim.Admin.Admin;
using BCDto.TMS.Agent.AgentBranchesConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCService.TMS.Agent.AgentBranchesConfig
{
    /// <summary>
    /// 代理商网点配置
    /// </summary>
    public interface IAgentBranchesConfigService
    {
        /// <summary>
        /// 添加新代理商网点配置记录
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="dto">代理商网点配置数据模型</param>
        /// <returns></returns>
        AgentBranchesConfigDto Add(AdminDto admin, AgentBranchesConfigRequestDto dto);

        /// <summary>
        /// 更新代理商网点配置记录
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="agentBranchesConfigId">代理商网点配置Id</param>
        /// <param name="dto">代理商网点配置数据模型</param>
        /// <returns></returns>
        AgentBranchesConfigDto Update(AdminDto admin, long agentBranchesConfigId, AgentBranchesConfigRequestDto dto);

        /// <summary>
        /// 获取代理商网点配置记录
        /// </summary>
        /// <param name="agentBranchesConfigId">代理商网点配置Id</param>
        /// <returns></returns>
        AgentBranchesConfigDto GetById(long agentBranchesConfigId);

        /// <summary>
        /// 删除代理商网点配置记录
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="agentBranchesConfigId">代理商网点配置Id</param>
        void Delete(AdminDto admin, long agentBranchesConfigId);

        /// <summary>
        /// 查询代理商网点配置
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="agentBranchesName">代理商网点名称</param>
        /// <param name="contactPhone">联系人电话</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">城市编码</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="address">地址信息</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<AgentBranchesConfigDto> Query(AdminDto admin, string agentBranchesName, string contactPhone, string provinceCode, string cityCode, string countyCode, string address, int pageIndex, int pageSize);

        /// <summary>
        /// 获取附近代理商网点配置
        /// </summary>
        /// <param name="longitude">经度</param>
        /// <param name="latitude">纬度</param>
        /// <param name="maxDistance">最大距离</param>
        /// <returns></returns>
        IEnumerable<BranchesLocationNearDto> GetList(double longitude, double latitude, int maxDistance);
    }
}
